{% if num_pages > 1 %}
    <div class="paginator">
        {% if current_page != 1 %}
            <a href="{{ url }}1">1</a>
        {% endif %}
        {% if prev >= 1 %}
            <a href="{{ url }}{{ prev }}"><span class="iconfont icon-left"></span></a>
        {% endif %}

        {% for i in page_list %}
            <a {% if i == current_page %} class="active" href="javascript:;" {% else %}
                                          href="{{ url }}{{ i }}" {% endif %}>{{ i }}</a>
        {% endfor %}

        {% if next <= num_pages %}
            <a href="{{ url }}{{ next }}"><span class="iconfont icon-right"></span></a>
        {% endif %}
        {% if current_page != num_pages %}
            <a href="{{ url }}{{ num_pages }}">{{ num_pages }}</a>
        {% endif %}
    </div>
{% endif %}